<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered)">
<title>WUDF Toaster</title>
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Cambria;
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"MS Sans Serif";}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
h2
	{mso-style-link:"Heading 2 Char";
	margin-right:0in;
	margin-left:0in;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	color:black;
	font-weight:bold;}
h3
	{mso-style-link:"Heading 3 Char";
	margin-right:0in;
	margin-left:0in;
	font-size:13.5pt;
	font-family:"Times New Roman","serif";
	color:black;
	font-weight:bold;}
h4
	{mso-style-link:"Heading 4 Char";
	margin-right:0in;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;
	font-weight:bold;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p
	{margin-right:0in;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
pre
	{mso-style-link:"HTML Preformatted Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Courier New";
	color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
span.Heading2Char
	{mso-style-name:"Heading 2 Char";
	mso-style-link:"Heading 2";
	font-family:"Cambria","serif";
	color:#4F81BD;
	font-weight:bold;}
span.Heading3Char
	{mso-style-name:"Heading 3 Char";
	mso-style-link:"Heading 3";
	font-family:"Cambria","serif";
	color:#4F81BD;
	font-weight:bold;}
span.Heading4Char
	{mso-style-name:"Heading 4 Char";
	mso-style-link:"Heading 4";
	font-family:"Cambria","serif";
	color:#4F81BD;
	font-weight:bold;
	font-style:italic;}
span.HTMLPreformattedChar
	{mso-style-name:"HTML Preformatted Char";
	mso-style-link:"HTML Preformatted";
	font-family:Consolas;
	color:black;}
p.msolistparagraphcxspfirst, li.msolistparagraphcxspfirst, div.msolistparagraphcxspfirst
	{mso-style-name:msolistparagraphcxspfirst;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
p.msolistparagraphcxspmiddle, li.msolistparagraphcxspmiddle, div.msolistparagraphcxspmiddle
	{mso-style-name:msolistparagraphcxspmiddle;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
p.msolistparagraphcxsplast, li.msolistparagraphcxsplast, div.msolistparagraphcxsplast
	{mso-style-name:msolistparagraphcxsplast;
	margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
p.style3, li.style3, div.style3
	{mso-style-name:style3;
	margin-right:0in;
	margin-left:0in;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";
	color:windowtext;}
p.msochpdefault, li.msochpdefault, div.msochpdefault
	{mso-style-name:msochpdefault;
	margin-right:0in;
	margin-left:0in;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";
	color:black;}
span.style31
	{mso-style-name:style31;}
.MsoChpDefault
	{font-size:10.0pt;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 ol
	{margin-bottom:0in;}
ul
	{margin-bottom:0in;}
-->
</style>

<meta name=Template content="C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\html.dot">
</head>

<body bgcolor=white lang=EN-US link=blue vlink=purple leftmargin=8>

<div class=Section1>

<h2><span style='font-family:"Verdana","sans-serif"'>WUDF Toaster </span></h2>

<h3><span style='font-family:"Verdana","sans-serif"'>SUMMARY</span></h3>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This is a
featured version of the UMDF toaster function driver.&nbsp; This driver enables
a user application (toast/notify.exe) to open the device interface that is registered
by the driver and send read, write or ioctl requests. This driver sample also
shows how to register for PnP and Power events, how to set Power policy
ownership and handle I/O requests.</span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This is a
minimal driver sample meant to demonstrate the usage of the Windows Driver
Framework. It is not intended for use in a production environment. </span></p>

<h3><span style='font-family:"Verdana","sans-serif"'>BUILDING THE SAMPLE</span></h3>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Click the
Free Build Environment or Checked Build Environment icon under Development Kits
program group to set basic environment variables. </span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Change to
the directory containing the device source code, such as CD
src\general\toaster\umdf\func</span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Run <b>build
-ceZ,</b> or use the macro <b>BLD</b>. This command invokes the Microsoft make
routines to build the components. If the build </span>s<span style='font-size:
10.0pt;font-family:"Verdana","sans-serif"'>ucceeds, you will find the driver
WUDFToaster.dll and WUDFToaster.inf in your binaries folder root under \wudf.</span></p>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>If it
fails you can find errors and warnings in the buildxxx.err and buildxxx.err
respectively, where xxx is either chk or fre depending on the build
environment. </span></p>

<h3><span style='font-family:"Verdana","sans-serif"'>INSTALLATION</span></h3>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Copy the
UMDF coinstaller (WUDFUpdate_01009.dll), driver binary and the WUDFToaster.inf
file to a floppy disk or a temp folder. </span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:windowtext'>To install the Umdf Toaster driver on Windows XP, Windows
Server 2003 or Windows Vista</span></p>

<ol style='margin-top:0in' start=1 type=1>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Double-click the &#8216;Add Hardware&#8217;
     wizard in Control Panel. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>At the 'Welcome to the Add Hardware
     Wizard', click &#8216;Next&#8217;. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Select 'Yes, I have already connected
     the hardware', then click Next. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Select &#8216;Add a new hardware
     device&#8217; from the list, then click Next. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Select &#8216;Install the hardware that
     I manually select from a list(Advanced),' and then click next. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Select &#8216;Show All Devices&#8217;,
     then click Next. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Click 'Have Disk', make sure that
     'A:\' is in the &quot;Copy manufacturer's files from:&quot; box, and click
     OK. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Click on the &quot;Sample WUDF Toaster
     Driver&quot; entry, and then click Next. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>At 'The wizard is ready to install
     your hardware', click Next. </span></li>
 <li class=MsoNormal style='color:windowtext'><span style='font-size:10.0pt;
     font-family:"Verdana","sans-serif"'>Click Finish at 'Completing the
     Add/Remove Hardware Wizard.' </span></li>
</ol>

<p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Another
quick way to install the UMDF Toaster driver without going through so many
mouse clicks would be to use the Installer sample application present in the <i>src\setup\devcon</i>
directory. This sample allows you to root-enumerate a driver with one simple
command. You have choices to run Enum application with &#8211;p option or to
install the driver using devcon.exe by the following command: </span></p>

<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre>&nbsp;</pre><pre><span
style='font-family:"Verdana","sans-serif"'>c:\&gt;devcon.exe&nbsp;install&nbsp; WUDFToaster.inf&nbsp; &quot;root\WUDFToaster&quot;&nbsp;</span></pre><pre><span
style='font-family:"Verdana","sans-serif"'>&nbsp;</span></pre></blockquote>

<h3><span style='font-family:"Verdana","sans-serif"'>CODE TOUR</span></h3>

<table class=MsoNormalTable border=1 cellpadding=0 width="75%"
 style='width:75.0%'>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>File
  Manifest</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>File
  Description</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>WUDFToaster.htm</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Documentation
  for this sample (this file).</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>WUDFToaster.idl</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=style3><span style='font-family:"Verdana","sans-serif"'>Component
  Interface file</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>WUDFToaster.cpp</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span class=style31><span style='font-size:10.0pt;
  font-family:"Verdana","sans-serif"'>DLL Support code - provides the DLL's
  entry point as well as the DllGetClassObject export.</span></span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>WUDFToaster.def</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
  file lists the functions that the driver DLL exports.</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>stdafx.h
  </span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
  is the main header file for the sample driver. </span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>driver.cpp
  &amp; driver.h</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Definition
  and implementation of the IDriverEntry callbacks in CDriver class. </span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>device.cpp
  &amp; device.h</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Definition
  and implementation of various interfaces and their callbacks in CDevice class.
  Add your PnP and Power interfaces specific for your hardrware.</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>queue.cpp
  &amp; queue.h</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Definition
  and implementation of the base queue callback class (CQueue).
  IQueueCallbackDevicekIoControl, IQueueCallbackRead and IQueueCallBackWrite
  callbacks are implemented to handle I/O control requests.</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>WUDFToaster.rc</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>This
  file defines resource information for the WUDF Toaster sample driver.</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>sources</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Generic
  file that lists source files and all the build options.</span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>WUDFToaster.inf</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Sample
  INF for installing the sample WUDF Toaster driver under the Toaster class of
  devices. </span></p>
  </td>
 </tr>
 <tr>
  <td width=213 style='width:159.65pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>WUDFtoaster.ctl,
  internal.h</span></p>
  </td>
  <td width=1013 style='width:759.45pt;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><span class=style31><span style='font-size:10.0pt;
  font-family:"Verdana","sans-serif"'>This file lists the WPP trace control
  GUID(s) for the sample driver. This file can be used with the tracelog
  command's -guid flag to enable the collection of these trace events within an
  established trace session.</span></span></p>
  <p class=style3><span style='font-family:"Verdana","sans-serif"'>These GUIDs
  must remain in sync with the trace control guids defined in internal.h</span></p>
  </td>
 </tr>
</table>

<h3 style='margin-left:.25in;text-indent:-.25in'><span style='font-family:"Verdana","sans-serif"'>&nbsp;</span></h3>

<h3 style='margin-left:.25in;text-indent:-.25in'><span style='font-family:"Verdana","sans-serif"'>ADVANCED
SECTION</span></h3>

<h3 style='margin-left:.25in;text-indent:-.25in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";font-weight:normal'>The WUDF Toaster gives the
possibility to leverage the existing KMDF Toastmon to demonstrate a kernel-mode
client access to a user-mode driver by using remote I/O targets.</span></h3>

<h3 style='margin-left:.25in;text-indent:-.25in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";font-weight:normal'>To allow that just add
the following line</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
&#8220;</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
font-weight:normal'>UmdfKernelModeClientPolicy = AllowKernelModeClients&#8221;
to the .WDF section of the INF for this UMDF driver.</span></h3>

<h3 style='margin-left:.25in;text-indent:-.25in'>&nbsp;</h3>

<h3><span style='font-family:"Verdana","sans-serif"'>TESTING</span></h3>

<h3 style='margin-left:.25in;text-indent:-.25in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";font-weight:normal'>1)</span><span
style='font-size:7.0pt;font-weight:normal'>&nbsp;&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";font-weight:normal'>Use
Toast.exe, Notify.exe or Enum.exe applications &#8211; their functionality must
be the same as with KMDF Toaster sample.</span></h3>

<h3 style='margin-left:.25in;text-indent:-.25in'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";font-weight:normal'>2)</span><span
style='font-size:7.0pt;font-weight:normal'>&nbsp;&nbsp;&nbsp; </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";font-weight:normal'>Install
KMDF Toastmon driver. Allow kernel mode clients to user mode drivers as
described in the advanced section. Install WUDF Toaster driver. Use a
Traceview.exe to see the requests sent from Toastmon to the UMDF Toaster.</span></h3>

<h3 style='margin-left:.5in'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
font-weight:normal'>&nbsp;</span></h3>

<h3 style='margin-left:.5in;text-indent:-.25in'>&nbsp;</h3>

<h3 style='margin-left:.5in;text-indent:-.25in'>&nbsp;</h3>

<p align=center style='text-align:center'><a href="#top"><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Top of page</span></a><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'> </span></p>

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=624
 style='width:6.5in'>
 <tr style='height:1.5pt'>
  <td style='background:aqua;padding:.75pt .75pt .75pt .75pt;height:1.5pt'>
  <p class=MsoNormal><span style='font-size:2.0pt'>&nbsp;</span></p>
  </td>
 </tr>
</table>

<p><span style='font-size:7.5pt;font-family:"MS Sans Serif"'>&copy; 2008 Microsoft
Corporation</span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
</span></p>

</div>

</body>

</html>

